<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var obj = { name: '王', age: 66 }
        //结构重命名
        var { myName: name, myAge: age } = obj;
        // ...扩展运算符
        var obj = { a: 1, b: 25, c: 33 }
        var { a, ...lx } = obj;
        //console.log(lx)
        var obj2 = { name: '456' }
        var obj3= Object.assign(obj2,obj)
        var obj4 = {...obj,...obj2}
        //数组的结构
        var arr= [1,2,3]
        var [a,b,c]=arr
        console.log(a,b,c)
        //交换bc的值
        var [b,c]=[c,b]
        console.log(b,c)
        // 数组合并
        var arr2 = [4,5,6]
        console.log(arr.concat(arr2))
        console.log([...arr,...arr2])
    </script>
</body>

</html>